<?php
/**
 * Pour la mise a jour
 * Besoin de refaire le fchier de config.php
 * */
$error = 0;
$error_fatal = 0;
$message_error = '';
require '../header_update.php';
require '../function.php';
require '../lang/french.php';

if(!dossier_ecrire('../../upload/temporaire/'))
{
    $error++;
    $message_error .='
    <div style="margin: auto; width: 75%;">
    <div class="bad100">
        <div style="float: left;"><img src="images/alert.gif" border="0" /></div>
        <div>Impossible d ecrire dans le dossier <strong>upload/temporaire</strong></div>
        <div style="clear: both;"></div>
	</div>
    </div>
    <div style="clear: both;"></div><br /><br />';
}
if(!@rename('../../install/', time().'install'.time()))
{
    $error++;
    $message_error .='
    <div style="margin: auto; width: 75%;">
    <div class="bad100">
    <div style="float: left;">
    <img src="images/alert.gif" border="0" />
	</div>
	<div>' . $lang['Impossible_modifier_supprimer_install'] . '</div>
	<div style="clear: both;"></div>
	</div><div style="clear: both;"></div><br /><br />';
} 
 
 if($error != 0)
 {
    echo $message_error;
    if($error_fatal == 0)
    {
      echo $lang['Texte_fin_update_110'];  
    }
    
 }
 else
 {
    echo $lang['Texte_fin_update_110'];
 }
 require '../footer.php';
 ?>